package com.wz.project.test.controller;

import com.wz.framework.web.domain.AjaxResult;
import com.wz.project.test.domain.Findspace;
import com.wz.project.test.service.HandTestService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/test")
public class HandTestController {

    private String prefix = "test";

    @Autowired
    HandTestService handTestService;

//    @RequiresPermissions("test:findspace:view")
    @GetMapping("/findspace")
    public String productIn() {
        return prefix + "/findspace";
    }


    @RequestMapping("/allocate")
    @ResponseBody
    public AjaxResult allocate(Findspace findspace){

      String msg=  handTestService.allocate(findspace);
       return AjaxResult.success(msg);


    }


}
